import {http,instance2} from "../utils/http"


//全国开奖
export const getLotteryDraw = (p) => http.get("/getLotDraw.php", p)

//历史开奖
export const getHistoryAwards = (p) => http.get("/getHistoryAwards.php", p)

// 开奖详情
export const getLotteryDrawDetails = (p) => http.get("/getLotDrawDetails.php", p)

//获取广告
export const getAdverti = (p) => http.get("/getAdverti.php", p)


export const getAdvertiSense = (p) => http.get("/getAdvertiSense.php", p)

function getnews(gid,pid){
  return instance2({
  url:'/tjdata/game/'+gid+'/'+pid+'.json?rnd=' + Math.random(),
  }).then( res=>{
    return res
  })
}

function getPhone(num){
  return instance2({
    url:'/tjdata/game/current/'+num+'.json?rnd=' + Math.random(),
  }).then(res=>{
    return res
  })
}

function hotlist() {
  return instance2({
    url: "/tjdata/news/hotlist.json?rnd=" + Math.random(),
    method: "get",
  }).then((v) => {
    return {
      data: {
        status: "_0000",
        message: "成功",
        data: v.data,
      },
    }
  })
}

export {getnews,getPhone,hotlist}




